<template>
  <div class="m-kline">
    <div class="flex-between">
      <div class="line-body">
        <div class="tab-group">
          <span :class="{active:lineActive===0}" @click="changeLineRange(0)">D1</span>
          <span :class="{active:lineActive===1}" @click="changeLineRange(1)">W1</span>
          <span :class="{active:lineActive===2}" @click="changeLineRange(2)">M1</span>
        </div>
      </div>
      <div class="tab-group tab-menu flex-between">
        <div class="k-btn" :class="{active:active===0}" @click="changeLine(0)">燃烧行情</div>
        <div class="k-btn" :class="{active:active===1}" @click="changeLine(1)">价格行情</div>
      </div>
    </div>
    <div id="coinLine"></div>
  </div>
</template>

<script>
import klineBase from "@/mixins/Home/kline.js";
export default {
  mixins: [klineBase]
};
</script>

<style lang="scss" scoped>
.m-kline {
  background: $white;
  height: 183px;
  padding: 15px 10px 8px;
  .line-body {
    .tab-group {
      span {
        margin-right: 31px;
        color: $font_grey;
        cursor: pointer;
      }
      .active {
        color: $blue;
      }
    }
  }
  .tab-menu {
    width: 146px;
    .k-btn {
      width: 67px;
      line-height: 20px;
      text-align: center;
      background: rgba(217, 217, 217, 1);
      border-radius: 9px;
      color: #343640;
      cursor: pointer;
      transition: 0.3s;
    }
    .active {
      background: $blue;
      color: $white;
    }
  }
  #coinLine {
    margin-top: 20px;
    height: 120px;
  }
}
</style>